home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: lewkbj@ix.netcom.com (leonel wizel )
- Newsgroups: comp.lang.c++
- Subject: I need help with homework
- Date: 17 Apr 1996 03:11:28 GMT
- Organization: Netcom
- Message-ID: <4l1nh0$oed@dfw-ixnews1.ix.netcom.com>
- NNTP-Posting-Host: ix-nyc9-12.ix.netcom.com
- X-NETCOM-Date: Tue Apr 16 10:11:28 PM CDT 1996
-
-
- Please I need help to complete this file: this file suppose to
- increment the object time by one second to the next hour, to the
- next minute to the next day:
-
- I need some help please:
-
-
- the program suppose to modify to include a tick member function
- that increments the time stored in the Time object by one second. The
- time object should always remain in a consistent state. The driver
- program that tests the tick member function in a loop that prints the
- time in standard format during each iteration of the loop to illustrate
- that the tick member functions workds correctly.
-
- Incrementing into the next minute.
- Incrementing into the next hour.
- incrementing into the next day(i.e., 11:59:59 PM to 12:00:00 AM).
-
-
- Create a modified class Time combined it with another class
- called "DateAndtime". Modify the tick function to call the nextDay
- function if the time is incremented into the next day. Modify function
- printStandard and PrintMilitary to output thee date in addtion to the
- time. Write a driver program to test the new class "DateAndTime".
- specifically test incrementing the time into the next day.
-
- Modify the Date class to perform error checking on the initializer
- values for data members month, day and year. Also provide a member
- function NextDay to increment the day by one. The Date object should
- always remain in a consistent state. Write a driver program that tests
- the nextDay function in a loop that prints the date during each
- iteration of the loop to illustrate that the Nextday function works
- correctly. I have to make sure to test the following cases:
-
- Incrementing into the next month.
- incrementing into the next year.
-
-
- Modify the set functions in the previous program to return appropiate
- error values if an attempt is made to set a data member of an object of
- class Time to an invalid values.
-
- thank you for your cooperatiFrom: lewkbj@ix.netcom.com (leonel wizel )
- Newsgroups: comp.lang.c++
- Subject: I need help with homework
-
-
- Please I need help to complete this file: this file suppose to
- increment the object time by one second to the next hour, to the
- next minute to the next day:
-
- I need some help please:
-
-
- the program suppose to modify to include a tick member function
- that increments the time stored in the Time object by one second. The
- time object should always remain in a consistent state. The driver
- program that tests the tick member function in a loop that prints the
- time in standard format during each iteration of the loop to illustrate
- that the tick member functions workds correctly.
-
- Incrementing into the next minute.
- Incrementing into the next hour.
- incrementing into the next day(i.e., 11:59:59 PM to 12:00:00 AM).
-
-
- Create a modified class Time combined it with another class
- called "DateAndtime". Modify the tick function to call the nextDay
- function if the time is incremented into the next day. Modify function
- printStandard and PrintMilitary to output thee date in addtion to the
- time. Write a driver program to test the new class "DateAndTime".
- specifically test incrementing the time into the next day.
-
- Modify the Date class to perform error checking on the initializer
- values for data members month, day and year. Also provide a member
- function NextDay to increment the day by one. The Date object should
- always remain in a consistent state. Write a driver program that tests
- the nextDay function in a loop that prints the date during each
- iteration of the loop to illustrate that the Nextday function works
- correctly. I have to make sure to test the following cases:
-
- Incrementing into the next month.
- incrementing into the next year.
-
-
- Modify the set functions in the previous program to return appropiate
- error values if an attempt is made to set a data member of an object of
- class Time to an invalid values.
-
- thank you for your cooperatide <iostream.h>
- #include "time3.h"
- #include "time3.cpp"
-
-
- main()
- {
- Time t;
-
- t.setTime(23, 59, 59);
-
- for(long int i = 1; i <= 2; i++)
- {
- cout << endl << endl;
- cout << " Hour " << t.getHour()
- << " Minute " << t.getMinute()
- << " Second " << t.getSecond();
-
- cout <<"the initial time before incrementing is: " << endl
- << endl;
-
- t.printStandard();
- cout << endl;
- t.printMilitary();
-
- t.tick_increment();
- cout << " Hour " << t.getHour()
- << " Minute " << t.getMinute()
- << " Second " << t.getSecond()
- <<" the time after incrementing is: " << endl;
-
- t.printStandard();
- cout << endl;
- t.printMilitary();
-
- }
-
-
-
- return 0;
- }
-
- thank you all of you for your cooperation and help.
-
-
-
-
-
-
-
-
-
-
-